
<#import "_master.ftl" as layout />

<@layout.masterTemplate
title="Ascensore ${ascensore.modello.nome}" selected="Ascensori">


<section id="model">
	<ul class="breadcrumb">
		<li><a href="/Ascensori">Ascensori</a> <span class="divider">/</span></li>
		<li class="active">${ascensore.modello.nome}</li>
	</ul>
	<div class="page-header">
		<h1>
			${ascensore.modello.nome} <small>Ascensore</small>
		</h1>
	</div>
	<form class="bs-docs form-horizontal">
		<div class="control-group">
			<label class="control-label">Modello</label>
			<div class="controls">
				<input type="text" value="${ascensore.modello}" disabled="disabled" />
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">Edificio</label>
			<div class="controls">
				<input class="span5" type="text" value="${ascensore.edificio.indirizzo}"  disabled="disabled" />
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">Data installazione</label>
			<div class="controls">
				<input type="text" value="${ascensore.dataInstallazione?date?string.long}" disabled="disabled" />
			</div>
		</div>
	</form>
	<h2>Interventi</h2>
	<table class="table table-striped" id="list">
		<#if (ascensore.interventi?size > 0)>
		<thead>
			<tr>
				<th>#</th>
				<th>Data</th>
				<th>Descrizione</th>
				<th>Tecnico</th>
			</tr>
		</thead>
		<tbody>
			<#list ascensore.interventi as intervento>
			<tr>
				<td>${intervento.id?string.computer}</td>
				<td>${intervento.data?date?string.long}</td>
				<td>${intervento.descrizione}</td>
				<td>${intervento.tecnico}</td>
			</tr>
			</#list>
		</tbody>
		<#else>
		<tbody>
			<tr>
				<td colspan="4">Nessun intervento trovato</td>
			</tr>
		</tbody>
		</#if>
	</table>
</section>



</@layout.masterTemplate>